\documentclass[11pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[cm, empty]{fullpage}
\usepackage{amsmath}
\usepackage{hyperref}
\setlength{\parindent}{1cm}
%\usepackage{setspace}
%\onehalfspacing


\begin{document}
\title{CS-440 ACG - Exercise 1}
\author{Mihai Moraru, Kostiantyn Pupykin}
%\date{December 7, 2011}
\maketitle

\section*{}
We dedicated approximately 7 hours to exercise 1 plus an additional 4h for exercise 0 (i.e.: setting up the project on Linux).

Problems encountered:
\begin{itemize}
	\item the most annoying was using abs() instead of fabs() => cosine was zero or one, the result being completely messed up
	\item energy conservation for the BRDF (division by $\pi$)
\end{itemize}

%\section*{1.3 Constant shading}
\section*{1.4 Sampling a hemisphere uniformly}
We took the sampling strategy proposed in the lecture ("Light Transport Basics", slide 60). This sampling is uniform because
\begin{enumerate}
	\item we sample the carthesian coordiante space in a uniform manner (a cube)
	\item we reject the points outside the sphere. The remaining points are uniform because of 1). So after step 2) we have uniformly sampled a sphere.
	\item we take the opposite of the sampled vector in case it's on the wrong side of the plane defined by the normal (zenith). Although we should normally mirror the vector with respect to this plane, this approach works because it is a symmetric operation.
\end{enumerate}
		So after step 3) we have a uniform sampling of a hemisphere.

\section*{1.5 Monte Carlo estimation}
	Because the hemisphere has an opening of $2\pi$ steradians, choosing one particular direction has probability $1/2\pi$. As the probability distribution is uniform, $pdf(s_i) = 1/2\pi \quad \forall s_i$.

\section*{1.6 Testing}
	We rendered the LGG scene using nSamples = 1000. The rendering took 247 seconds.

\end{document}
